package com.cms.common.model.services;


import com.cms.common.model.entity.AdminUser;
import com.cms.common.model.entity.Permission;
import com.cms.common.model.vo.PermissionVo;

import java.lang.reflect.Method;
import java.util.List;

public interface PermissionService {
    public void initPermission();

    public boolean checkPermission(Method targetMethod, Class<?> clazz) throws Exception;

    public boolean checkPermission(AdminUser adminUser, String route, int type) throws Exception;

    public List<PermissionVo> getAllPermissionVos(boolean isPlugin);

    public List<PermissionVo> getAllPermissionVos(boolean isPlugin,List<Permission> checkedPermissions);

    public List<Permission> getAllPermissions();

    public List<Permission> getPermissionsByIds(List<Long> ids);
}
